package com.demo.phonerepair.controller;

import com.demo.phonerepair.pojo.Role;
import com.demo.phonerepair.service.RoleService;
import com.demo.phonerepair.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/role")
public class RoleController {
    @Autowired
    private RoleService roleService;

    @GetMapping("/list")
    public Result<List<Role>> list() {
        return roleService.listAllRoles();
    }

}